3.1.39 \(\int \frac {(a+b \log (c x^n))^2 \log (d (\frac {1}{d}+f x^2))}{x^4} \, dx\) [39]

Optimal. Leaf size=543 \[ -\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}+\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )-\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )+\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )+\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )+\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {Li}_3\left (-\sqrt {-d} \sqrt {f} x\right )-\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {Li}_3\left (\sqrt {-d} \sqrt {f} x\right ) \]

[Out]

-52/27*b^2*d*f*n^2/x-4/27*b^2*d^(3/2)*f^(3/2)*n^2*arctan(x*d^(1/2)*f^(1/2))-16/9*b*d*f*n*(a+b*ln(c*x^n))/x-4/9
*b*d^(3/2)*f^(3/2)*n*arctan(x*d^(1/2)*f^(1/2))*(a+b*ln(c*x^n))-2/3*d*f*(a+b*ln(c*x^n))^2/x-2/27*b^2*n^2*ln(d*f
*x^2+1)/x^3-2/9*b*n*(a+b*ln(c*x^n))*ln(d*f*x^2+1)/x^3-1/3*(a+b*ln(c*x^n))^2*ln(d*f*x^2+1)/x^3+1/3*(-d)^(3/2)*f
^(3/2)*(a+b*ln(c*x^n))^2*ln(1-x*(-d)^(1/2)*f^(1/2))-1/3*(-d)^(3/2)*f^(3/2)*(a+b*ln(c*x^n))^2*ln(1+x*(-d)^(1/2)
*f^(1/2))-2/3*b*(-d)^(3/2)*f^(3/2)*n*(a+b*ln(c*x^n))*polylog(2,-x*(-d)^(1/2)*f^(1/2))+2/3*b*(-d)^(3/2)*f^(3/2)
*n*(a+b*ln(c*x^n))*polylog(2,x*(-d)^(1/2)*f^(1/2))-2/9*I*b^2*d^(3/2)*f^(3/2)*n^2*polylog(2,I*x*d^(1/2)*f^(1/2)
)+2/9*I*b^2*d^(3/2)*f^(3/2)*n^2*polylog(2,-I*x*d^(1/2)*f^(1/2))+2/3*b^2*(-d)^(3/2)*f^(3/2)*n^2*polylog(3,-x*(-
d)^(1/2)*f^(1/2))-2/3*b^2*(-d)^(3/2)*f^(3/2)*n^2*polylog(3,x*(-d)^(1/2)*f^(1/2))

________________________________________________________________________________________

Rubi [A]
time = 0.53, antiderivative size = 543, normalized size of antiderivative = 1.00, number of steps used = 22, number of rules used = 14, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {2342, 2341, 2425, 331, 209, 2380, 2361, 12, 4940, 2438, 2367, 2354, 2421, 6724} \begin {gather*} -\frac {2}{3} b (-d)^{3/2} f^{3/2} n \text {PolyLog}\left (2,-\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {2}{3} b (-d)^{3/2} f^{3/2} n \text {PolyLog}\left (2,\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )-\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )+\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {PolyLog}\left (3,-\sqrt {-d} \sqrt {f} x\right )-\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {PolyLog}\left (3,\sqrt {-d} \sqrt {f} x\right )-\frac {4}{9} b d^{3/2} f^{3/2} n \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {1}{3} (-d)^{3/2} f^{3/2} \log \left (1-\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{3} (-d)^{3/2} f^{3/2} \log \left (\sqrt {-d} \sqrt {f} x+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}-\frac {2 b n \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (d f x^2+1\right )}{27 x^3}-\frac {52 b^2 d f n^2}{27 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])^2*Log[d*(d^(-1) + f*x^2)])/x^4,x]

[Out]

(-52*b^2*d*f*n^2)/(27*x) - (4*b^2*d^(3/2)*f^(3/2)*n^2*ArcTan[Sqrt[d]*Sqrt[f]*x])/27 - (16*b*d*f*n*(a + b*Log[c
*x^n]))/(9*x) - (4*b*d^(3/2)*f^(3/2)*n*ArcTan[Sqrt[d]*Sqrt[f]*x]*(a + b*Log[c*x^n]))/9 - (2*d*f*(a + b*Log[c*x
^n])^2)/(3*x) + ((-d)^(3/2)*f^(3/2)*(a + b*Log[c*x^n])^2*Log[1 - Sqrt[-d]*Sqrt[f]*x])/3 - ((-d)^(3/2)*f^(3/2)*
(a + b*Log[c*x^n])^2*Log[1 + Sqrt[-d]*Sqrt[f]*x])/3 - (2*b^2*n^2*Log[1 + d*f*x^2])/(27*x^3) - (2*b*n*(a + b*Lo
g[c*x^n])*Log[1 + d*f*x^2])/(9*x^3) - ((a + b*Log[c*x^n])^2*Log[1 + d*f*x^2])/(3*x^3) - (2*b*(-d)^(3/2)*f^(3/2
)*n*(a + b*Log[c*x^n])*PolyLog[2, -(Sqrt[-d]*Sqrt[f]*x)])/3 + (2*b*(-d)^(3/2)*f^(3/2)*n*(a + b*Log[c*x^n])*Pol
yLog[2, Sqrt[-d]*Sqrt[f]*x])/3 + ((2*I)/9)*b^2*d^(3/2)*f^(3/2)*n^2*PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x] - ((2*I)
/9)*b^2*d^(3/2)*f^(3/2)*n^2*PolyLog[2, I*Sqrt[d]*Sqrt[f]*x] + (2*b^2*(-d)^(3/2)*f^(3/2)*n^2*PolyLog[3, -(Sqrt[
-d]*Sqrt[f]*x)])/3 - (2*b^2*(-d)^(3/2)*f^(3/2)*n^2*PolyLog[3, Sqrt[-d]*Sqrt[f]*x])/3

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 331

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*c
*(m + 1))), x] - Dist[b*((m + n*(p + 1) + 1)/(a*c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2354

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[Log[1 + e*(x/d)]*((a +
b*Log[c*x^n])^p/e), x] - Dist[b*n*(p/e), Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2361

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> With[{u = IntHide[1/(d + e*x^2),
 x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[u/x, x], x]] /; FreeQ[{a, b, c, d, e, n}, x]

Rule 2367

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = Expand
Integrand[(a + b*Log[c*x^n])^p, (d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}
, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))

Rule 2380

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.))/((d_) + (e_.)*(x_)^(r_.)), x_Symbol] :> Dist[1/d,
 Int[x^m*(a + b*Log[c*x^n])^p, x], x] - Dist[e/d, Int[(x^(m + r)*(a + b*Log[c*x^n])^p)/(d + e*x^r), x], x] /;
FreeQ[{a, b, c, d, e, m, n, r}, x] && IGtQ[p, 0] && IGtQ[r, 0] && ILtQ[m, -1]

Rule 2421

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> Simp
[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c*x^n])^p/m), x] + Dist[b*n*(p/m), Int[PolyLog[2, (-d)*f*x^m]*((a + b*L
og[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 2425

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((g_.)*(x_))^(q_.),
 x_Symbol] :> With[{u = IntHide[(g*x)^q*(a + b*Log[c*x^n])^p, x]}, Dist[Log[d*(e + f*x^m)^r], u, x] - Dist[f*m
*r, Int[Dist[x^(m - 1)/(e + f*x^m), u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && IGtQ[p, 0
] && RationalQ[m] && RationalQ[q]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^4} \, dx &=-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-(2 f) \int \left (-\frac {2 b^2 d n^2}{27 x^2 \left (1+d f x^2\right )}-\frac {2 b d n \left (a+b \log \left (c x^n\right )\right )}{9 x^2 \left (1+d f x^2\right )}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{3 x^2 \left (1+d f x^2\right )}\right ) \, dx\\ &=-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} (2 d f) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2 \left (1+d f x^2\right )} \, dx+\frac {1}{9} (4 b d f n) \int \frac {a+b \log \left (c x^n\right )}{x^2 \left (1+d f x^2\right )} \, dx+\frac {1}{27} \left (4 b^2 d f n^2\right ) \int \frac {1}{x^2 \left (1+d f x^2\right )} \, dx\\ &=-\frac {4 b^2 d f n^2}{27 x}-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} (2 d f) \int \left (\frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2}-\frac {d f \left (a+b \log \left (c x^n\right )\right )^2}{1+d f x^2}\right ) \, dx+\frac {1}{9} (4 b d f n) \int \left (\frac {a+b \log \left (c x^n\right )}{x^2}-\frac {d f \left (a+b \log \left (c x^n\right )\right )}{1+d f x^2}\right ) \, dx-\frac {1}{27} \left (4 b^2 d^2 f^2 n^2\right ) \int \frac {1}{1+d f x^2} \, dx\\ &=-\frac {4 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} (2 d f) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx-\frac {1}{3} \left (2 d^2 f^2\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{1+d f x^2} \, dx+\frac {1}{9} (4 b d f n) \int \frac {a+b \log \left (c x^n\right )}{x^2} \, dx-\frac {1}{9} \left (4 b d^2 f^2 n\right ) \int \frac {a+b \log \left (c x^n\right )}{1+d f x^2} \, dx\\ &=-\frac {16 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {4 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {1}{3} \left (2 d^2 f^2\right ) \int \left (\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 \left (1-\sqrt {-d} \sqrt {f} x\right )}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 \left (1+\sqrt {-d} \sqrt {f} x\right )}\right ) \, dx+\frac {1}{3} (4 b d f n) \int \frac {a+b \log \left (c x^n\right )}{x^2} \, dx+\frac {1}{9} \left (4 b^2 d^2 f^2 n^2\right ) \int \frac {\tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f} x} \, dx\\ &=-\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {1}{3} \left (d^2 f^2\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{1-\sqrt {-d} \sqrt {f} x} \, dx-\frac {1}{3} \left (d^2 f^2\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{1+\sqrt {-d} \sqrt {f} x} \, dx+\frac {1}{9} \left (4 b^2 d^{3/2} f^{3/2} n^2\right ) \int \frac {\tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{x} \, dx\\ &=-\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}+\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )-\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {1}{3} \left (2 b (-d)^{3/2} f^{3/2} n\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1-\sqrt {-d} \sqrt {f} x\right )}{x} \, dx+\frac {1}{3} \left (2 b (-d)^{3/2} f^{3/2} n\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\sqrt {-d} \sqrt {f} x\right )}{x} \, dx+\frac {1}{9} \left (2 i b^2 d^{3/2} f^{3/2} n^2\right ) \int \frac {\log \left (1-i \sqrt {d} \sqrt {f} x\right )}{x} \, dx-\frac {1}{9} \left (2 i b^2 d^{3/2} f^{3/2} n^2\right ) \int \frac {\log \left (1+i \sqrt {d} \sqrt {f} x\right )}{x} \, dx\\ &=-\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}+\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )-\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )+\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )+\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )+\frac {1}{3} \left (2 b^2 (-d)^{3/2} f^{3/2} n^2\right ) \int \frac {\text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )}{x} \, dx-\frac {1}{3} \left (2 b^2 (-d)^{3/2} f^{3/2} n^2\right ) \int \frac {\text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )}{x} \, dx\\ &=-\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}+\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )-\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )+\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )+\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )+\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {Li}_3\left (-\sqrt {-d} \sqrt {f} x\right )-\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {Li}_3\left (\sqrt {-d} \sqrt {f} x\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.35, size = 585, normalized size = 1.08 \begin {gather*} \frac {1}{27} \left (-2 d^{3/2} f^{3/2} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (9 a^2+6 a b n+2 b^2 n^2+18 a b \left (-n \log (x)+\log \left (c x^n\right )\right )+6 b^2 n \left (-n \log (x)+\log \left (c x^n\right )\right )+9 b^2 \left (-n \log (x)+\log \left (c x^n\right )\right )^2\right )-\frac {2 d f \left (9 a^2+6 a b n+2 b^2 n^2+9 b^2 n^2 \log ^2(x)+6 b (3 a+b n) \log \left (c x^n\right )+9 b^2 \log ^2\left (c x^n\right )-6 b n \log (x) \left (3 a+b n+3 b \log \left (c x^n\right )\right )\right )}{x}-\frac {\left (9 a^2+6 a b n+2 b^2 n^2+6 b (3 a+b n) \log \left (c x^n\right )+9 b^2 \log ^2\left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{x^3}+\frac {6 i b d f n \left (3 a+b n-3 b n \log (x)+3 b \log \left (c x^n\right )\right ) \left (2 i+2 i \log (x)+\sqrt {d} \sqrt {f} x \left (\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )\right )-\sqrt {d} \sqrt {f} x \left (\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )\right )\right )}{x}+\frac {9 i b^2 d f n^2 \left (4 i+4 i \log (x)+2 i \log ^2(x)+\sqrt {d} \sqrt {f} x \left (\log ^2(x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+2 \log (x) \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-2 \text {Li}_3\left (-i \sqrt {d} \sqrt {f} x\right )\right )-\sqrt {d} \sqrt {f} x \left (\log ^2(x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+2 \log (x) \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )-2 \text {Li}_3\left (i \sqrt {d} \sqrt {f} x\right )\right )\right )}{x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])^2*Log[d*(d^(-1) + f*x^2)])/x^4,x]

[Out]

(-2*d^(3/2)*f^(3/2)*ArcTan[Sqrt[d]*Sqrt[f]*x]*(9*a^2 + 6*a*b*n + 2*b^2*n^2 + 18*a*b*(-(n*Log[x]) + Log[c*x^n])
 + 6*b^2*n*(-(n*Log[x]) + Log[c*x^n]) + 9*b^2*(-(n*Log[x]) + Log[c*x^n])^2) - (2*d*f*(9*a^2 + 6*a*b*n + 2*b^2*
n^2 + 9*b^2*n^2*Log[x]^2 + 6*b*(3*a + b*n)*Log[c*x^n] + 9*b^2*Log[c*x^n]^2 - 6*b*n*Log[x]*(3*a + b*n + 3*b*Log
[c*x^n])))/x - ((9*a^2 + 6*a*b*n + 2*b^2*n^2 + 6*b*(3*a + b*n)*Log[c*x^n] + 9*b^2*Log[c*x^n]^2)*Log[1 + d*f*x^
2])/x^3 + ((6*I)*b*d*f*n*(3*a + b*n - 3*b*n*Log[x] + 3*b*Log[c*x^n])*(2*I + (2*I)*Log[x] + Sqrt[d]*Sqrt[f]*x*(
Log[x]*Log[1 + I*Sqrt[d]*Sqrt[f]*x] + PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x]) - Sqrt[d]*Sqrt[f]*x*(Log[x]*Log[1 -
I*Sqrt[d]*Sqrt[f]*x] + PolyLog[2, I*Sqrt[d]*Sqrt[f]*x])))/x + ((9*I)*b^2*d*f*n^2*(4*I + (4*I)*Log[x] + (2*I)*L
og[x]^2 + Sqrt[d]*Sqrt[f]*x*(Log[x]^2*Log[1 + I*Sqrt[d]*Sqrt[f]*x] + 2*Log[x]*PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*
x] - 2*PolyLog[3, (-I)*Sqrt[d]*Sqrt[f]*x]) - Sqrt[d]*Sqrt[f]*x*(Log[x]^2*Log[1 - I*Sqrt[d]*Sqrt[f]*x] + 2*Log[
x]*PolyLog[2, I*Sqrt[d]*Sqrt[f]*x] - 2*PolyLog[3, I*Sqrt[d]*Sqrt[f]*x])))/x)/27

________________________________________________________________________________________

Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {\left (a +b \ln \left (c \,x^{n}\right )\right )^{2} \ln \left (d \left (\frac {1}{d}+f \,x^{2}\right )\right )}{x^{4}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2*ln(d*(1/d+f*x^2))/x^4,x)

[Out]

int((a+b*ln(c*x^n))^2*ln(d*(1/d+f*x^2))/x^4,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^2))/x^4,x, algorithm="maxima")

[Out]

-1/27*(9*b^2*log(x^n)^2 + (2*n^2 + 6*n*log(c) + 9*log(c)^2)*b^2 + 6*a*b*(n + 3*log(c)) + 9*a^2 + 6*(b^2*(n + 3
*log(c)) + 3*a*b)*log(x^n))*log(d*f*x^2 + 1)/x^3 + integrate(2/27*(9*b^2*d*f*log(x^n)^2 + 9*a^2*d*f + 6*(d*f*n
 + 3*d*f*log(c))*a*b + (2*d*f*n^2 + 6*d*f*n*log(c) + 9*d*f*log(c)^2)*b^2 + 6*(3*a*b*d*f + (d*f*n + 3*d*f*log(c
))*b^2)*log(x^n))/(d*f*x^4 + x^2), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^2))/x^4,x, algorithm="fricas")

[Out]

integral((b^2*log(d*f*x^2 + 1)*log(c*x^n)^2 + 2*a*b*log(d*f*x^2 + 1)*log(c*x^n) + a^2*log(d*f*x^2 + 1))/x^4, x
)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2*ln(d*(1/d+f*x**2))/x**4,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^2))/x^4,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2*log((f*x^2 + 1/d)*d)/x^4, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\ln \left (d\,\left (f\,x^2+\frac {1}{d}\right )\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x^4} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n))^2)/x^4,x)

[Out]

int((log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n))^2)/x^4, x)

________________________________________________________________________________________